# -*- coding=utf-8 -*-
import jeepay
from jeepay.app_config import AppConfig

# 配置信息
api_key = "liC2rbnH0SJFWlVzwncM7FZeF6abLNE0s2EFPsK8ZVoTYVddBS3rX39tZX5jIrsdhA4EgNHilhhvqtCNK0quh8SIWBAWxb7HHjHcV4m9SBIptdBzXWLOmisRJF933qAm"
AppConfig.set_mch_no("M1679219294")
AppConfig.set_app_id("6416da5ee4b00bed884be286")
AppConfig.set_api_key(api_key)

"""
支付 API 文档：https://docs.jeequan.com/docs/jeepay/index
"""

print("退款查询")
try:
    refund_query = jeepay.Pay.refund_query(
        refundOrderId="R1747160237782626305",  # 退款订单号，与mchRefundNo二者传一即可
        # mchRefundNo="mho1705390436565"  # 商户退款单号，与refundOrderId二者传一即可
    )
    print(refund_query)
except Exception as e:
    print(e)
